Skip to content

feat: remove the experiment flag for the sandbox commands and add new partner template IDs#512

Open
vegeris wants to merge 7 commits intomainfrom
evegeris-rm-sandbox-experiment
Open

feat: remove the experiment flag for the sandbox commands and add new partner template IDs#512
vegeris wants to merge 7 commits intomainfrom
evegeris-rm-sandbox-experiment

Conversation

@vegeris
Copy link
Copy Markdown
Contributor

@vegeris vegeris commented Apr 28, 2026

Changelog

This is effectively the release of the sandbox commands and should be highlighted in the changelog:

slack sandbox create
slack sandbox delete
slack sandbox list

Details:

When creating a sandbox, users provide a name and domain for the sandbox, and a password for their user in the sandbox. Regular sandboxes can optionally use the 'default' or 'empty' templates. Partner developers can create partner sandboxes, which have some additional templates available to them (eg. 'finance' or 'hr' use cases). [The partner templates were added in this PR]

Users can view their sandboxes with the list command and delete sandboxes with the delete command.

Summary

This PR removes the experiment flag currently required to run the sandbox commands

Testing

Instead of:

lack sandbox list --experiment=sandboxes

We can run:

lack sandbox list

Requirements

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.22%. Comparing base (e1112eb) to head (5ff1a11).

Files with missing lines Patch % Lines
internal/prompts/team_select.go 0.00% 7 Missing ⚠️
cmd/sandbox/sandbox.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #512      +/-   ##
==========================================
- Coverage   71.27%   71.22%   -0.05%     
==========================================
  Files         222      222              
  Lines       18682    18665      -17     
==========================================
- Hits        13316    13295      -21     
- Misses       4187     4189       +2     
- Partials     1179     1181       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread cmd/sandbox/sandbox.go
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At line 80 there was a recommendation to use charm for the 'Choose a Slack team where your email address matches...' info message; is charm stable yet, such that we can make that change?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh (Charm) is now the default and only prompt library. So, if you're using a prompt then you're now using Charm's Huh :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea perhaps we get rid of that comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, gotcha :) Updated to use the 'Help' config for the prompt instead of a separate log statement

@vegeris vegeris marked this pull request as ready for review April 29, 2026 14:30
@vegeris vegeris requested a review from a team as a code owner April 29, 2026 14:30
Comment thread cmd/sandbox/create.go
"it-incident-management": 4,
"customer-support": 5,
"sales": 6,
"marketing": 7,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR also adds mappings for the new partner templates

Copy link
Copy Markdown
Member

@mwbrooks mwbrooks Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vegeris. In the future, it would be better for this to be a separate PR so that it can stand out in the GitHub Release Notes and Changelog.

suggestion: Can you please update the Changelog section of this PR Description so that the documentation team knows to document it on docs.slack.dev.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: @vegeris Can you please add these to the Long Description so that developers can discover the partner template Ids that are available to use?

Copy link
Copy Markdown
Contributor Author

@vegeris vegeris Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if we would want to highlight it in the Long Description as the grand majority of users would be regular non-partner developers; for the list command for example, we only add the 'sandbox type' label to partner sandboxes to reduce visual noise for regular sandboxes

document it on docs.slack.dev

Speaking of, I'd like to double check the process for getting new commands documented. My current assumption was that we would have a brief announcement in the Changelog through this PR and that once these changes are included in a release, that I would post in #api-docs to get the commands documented on docs.slack.dev?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if there's a strong preference I can apply the changes unrelated to removing the experiment flag first and then come back to this PR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

process for getting new commands documented

@vegeris The changelog included in the PR description might be alright to find this with next release! But let's keep watch of the published release! Reference should be generated automatic FWIW.

Perhaps now we can also update the experiments page to note the conclusion?

🔗 https://docs.slack.dev/tools/slack-cli/reference/experiments

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👾 ramble: I might also agree with separate PRs for future changes to make review more "obvious" for me with a single focused mind but I understand this now 🌚

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if we would want to highlight it in the Long Description as the grand majority of users would be regular non-partner developers

I feel we under utilitize the Long Description at the moment. We should feel comfortable documenting commands at length in the Long Description. After all, it's only shown when a developer wants to learn about that command, specifically. It's also generated into a webpage on docs.slack.dev.

All of that is to say, feel free to go full essay in a Long Description.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My current assumption was that we would have a brief announcement in the Changelog through this PR and that once these changes are included in a release, that I would post in #api-docs to get the commands documented on docs.slack.dev?

Yep, this is a good approach. Typically, the docs team is good at adding documentating while reviewing our releases changelog. However, a post in #api-docs will give them an earlier heads up.

All help docs are generated into references pages, automatically. But the docs team may decide to create dedicated guides for sandbox management.

@vegeris vegeris added the semver:minor Use on pull requests to describe the release version increment label Apr 29, 2026
@srtaalej srtaalej added the experiment Experimental feature accessed behind the --experiment flag or toggle label Apr 29, 2026
@mwbrooks mwbrooks added this to the Next Release milestone Apr 29, 2026
@mwbrooks mwbrooks changed the title feat: Remove the experiment flag for the sandbox commands feat: remove the experiment flag for the sandbox commands Apr 29, 2026
Copy link
Copy Markdown
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🏻 Thanks for removing the experiment @vegeris

✏️ I've left a few change request suggestions. In the future, I'd encourage the PR to only remove the experiment and add other additions in separate PRs. It allows both the documentation team to spot changes easier and our GitHub Release Notes (based on PR titles) to communicate the changes to our developers.

Comment thread cmd/sandbox/create.go
"it-incident-management": 4,
"customer-support": 5,
"sales": 6,
"marketing": 7,
Copy link
Copy Markdown
Member

@mwbrooks mwbrooks Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vegeris. In the future, it would be better for this to be a separate PR so that it can stand out in the GitHub Release Notes and Changelog.

suggestion: Can you please update the Changelog section of this PR Description so that the documentation team knows to document it on docs.slack.dev.

Comment thread cmd/sandbox/create.go
"it-incident-management": 4,
"customer-support": 5,
"sales": 6,
"marketing": 7,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: @vegeris Can you please add these to the Long Description so that developers can discover the partner template Ids that are available to use?

Comment thread cmd/sandbox/sandbox.go
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh (Charm) is now the default and only prompt library. So, if you're using a prompt then you're now using Charm's Huh :)

Comment thread internal/slackerror/errors.go Outdated
ErrDotEnvFileRead = "dotenv_file_read_error"
ErrDotEnvFileWrite = "dotenv_file_write_error"
ErrDotEnvVarMarshal = "dotenv_var_marshal_error"
ErrDomainLong = "domain_long"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Can this please be prefixed with ErrSandboxDomainLong = "sandbox_domain_long" so that we know it's part of the Sandbox error codes. You'll need to reorganize it alphabetically.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Updated this error code and alphabetized the sandbox error codes added previously!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚧 question(non-blocking): Are these error codes from the upstream APIs? I'm hesitant to prefix the error variables with "sandbox" but not the error code.

@mwbrooks mwbrooks changed the title feat: remove the experiment flag for the sandbox commands feat: remove the experiment flag for the sandbox commands and add new partner template IDs Apr 29, 2026
@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes labels Apr 29, 2026
@vegeris vegeris requested a review from mwbrooks April 30, 2026 19:14
@vegeris vegeris requested a review from srtaalej May 1, 2026 14:06
Copy link
Copy Markdown
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vegeris So excited this made it to the finish line - superb 🏁

I'm leaving a few comments on changes here because inline comments are not working right now?

  • The error codes for sandbox_already_deleted and password_too_short don't have messages included with the codes and I'm not sure if that's something for the backend or CLI?
  • The sandbox create password prompt appears as plain text when I expected it to be hidden?

Otherwise nothing blocking! The above might be intentional or for another PR too. Whenever is best please feel free to merge for this upcoming release! 🔮 ✨

Edit: Oopies looks like comments are truncated too! I will continue this but LGTM 🚢

Comment thread internal/slackerror/errors.go Outdated
ErrDotEnvFileRead = "dotenv_file_read_error"
ErrDotEnvFileWrite = "dotenv_file_write_error"
ErrDotEnvVarMarshal = "dotenv_var_marshal_error"
ErrDomainLong = "domain_long"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚧 question(non-blocking): Are these error codes from the upstream APIs? I'm hesitant to prefix the error variables with "sandbox" but not the error code.

Comment thread cmd/sandbox/create.go
"it-incident-management": 4,
"customer-support": 5,
"sales": 6,
"marketing": 7,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

process for getting new commands documented

@vegeris The changelog included in the PR description might be alright to find this with next release! But let's keep watch of the published release! Reference should be generated automatic FWIW.

Perhaps now we can also update the experiments page to note the conclusion?

🔗 https://docs.slack.dev/tools/slack-cli/reference/experiments

Comment thread cmd/sandbox/create.go
"it-incident-management": 4,
"customer-support": 5,
"sales": 6,
"marketing": 7,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👾 ramble: I might also agree with separate PRs for future changes to make review more "obvious" for me with a single focused mind but I understand this now 🌚

Copy link
Copy Markdown
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Thanks for the edits @vegeris! 🙇🏻

I've left a few more comments. The largest one is renaming the error codes (go variables and error code strings) to be prefixed with sandboxes, unless they're meant to be used by other areas of the CLI codebase.

🪙 🪙 I think this has been mentioned, but in the future please try to keep PRs focused. This PR should be focused on removing the experiment flag, but it's doing quite a bit more. It makes reviewing the PR difficult and the CHANGELOG will fail to capture what true scope of the PR.

Comment thread cmd/sandbox/create.go
"it-incident-management": 4,
"customer-support": 5,
"sales": 6,
"marketing": 7,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if we would want to highlight it in the Long Description as the grand majority of users would be regular non-partner developers

I feel we under utilitize the Long Description at the moment. We should feel comfortable documenting commands at length in the Long Description. After all, it's only shown when a developer wants to learn about that command, specifically. It's also generated into a webpage on docs.slack.dev.

All of that is to say, feel free to go full essay in a Long Description.

Comment thread cmd/sandbox/create.go
"it-incident-management": 4,
"customer-support": 5,
"sales": 6,
"marketing": 7,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My current assumption was that we would have a brief announcement in the Changelog through this PR and that once these changes are included in a release, that I would post in #api-docs to get the commands documented on docs.slack.dev?

Yep, this is a good approach. Typically, the docs team is good at adding documentating while reviewing our releases changelog. However, a post in #api-docs will give them an earlier heads up.

All help docs are generated into references pages, automatically. But the docs team may decide to create dedicated guides for sandbox management.

ErrAppNotHosted = "app_not_hosted"
ErrAppRemove = "app_remove_error"
ErrAppRenameApp = "app_rename_app"
ErrAtActiveSandboxLimit = "at_active_sandbox_limit"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: I'd like to see all of these new error codes prefixed with sandbox, similar to how our other error codes are prefixed with app, auth, etc. While our error codes aren't perfect, we're trying to keep the new ones more organized.

They should also be organized alphabetically after renamed.

For example:

Suggested change
ErrAtActiveSandboxLimit = "at_active_sandbox_limit"
ErrSandboxAtActiveLimit = "sandbox_at_active_limit"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality experiment Experimental feature accessed behind the --experiment flag or toggle semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants